home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 07 - 1991 / 07.02 Feb 91 / 4th Debugger Appl / 4th Debugger.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-02-15  |  5.2 KB  |  119 lines  |  [TEXT/KAHL]

  1. /************************************************************************/
  2. /*                                                                          */
  3. /*    Source   - 4th Debugger.h                                            */
  4. /*    Author   - Alexander S. Colwell, Copyright © 1990                    */
  5. /*                                                                        */
  6. /*    Purpose     - This 4th Dimension's    external area debugger include file.*/
  7. /*                                                                        */
  8. /************************************************************************/
  9.  
  10. #ifndef _4thDebugger_                /* Check if has been include yet    */
  11. #define    _4thDebugger_                /* Mark it has been included        */
  12.  
  13. #include <Global.h>                    /* Global variable defs                */
  14. #include <CApplication.h>            /* Application object defs            */
  15. #include <Commands.h>                /* Command object defs                */
  16. #include <CBartender.h>                /* Menu object defs                    */
  17. #include <CDecorator.h>                /* Window display object defs        */
  18. #include <CDesktop.h>                /* Desktop layer object defs        */
  19. #include <CDocument.h>                /* Document object defs                */
  20. #include <CEditText.h>                /* Text edit object defs            */
  21. #include <CScrollPane.h>            /* Scrolling pane object defs        */
  22. #include "4th Class.h"                /* 4th Ext Area Class defs            */
  23.  
  24.                                     /* Min/Max defs                        */
  25. #define    maxDbgChars    8000            /* Maximum # of chars in debug window*/
  26.  
  27.                                     /* Window/Dialog ID defs            */
  28. #define    eaWIND        500                /* "External Area" WIND template    */
  29. #define    dbgWIND        501                /* Debugger WIND template            */
  30. #define atDLOG        500                /* "About This..." DLOG                */
  31.  
  32.                                     /* External area commands            */
  33. #define    eaOpen        1024            /* Open "External Area" command        */
  34. #define    eaClose        1025            /* Close "External Area" command    */
  35. #define    ep1            1026            /* Run "External Proc #1" command    */
  36. #define    ep2            1027            /* Run "External Proc #2" command    */
  37. #define    ep3            1028            /* Run "External Proc #3" command    */
  38. #define    ep4            1029            /* Run "External Proc #4" command    */
  39. #define    ep5            1030            /* Run "External Proc #5" command    */
  40. #define    ep6            1031            /* Run "External Proc #6" command    */
  41. #define    ep7            1032            /* Run "External Proc #7" command    */
  42. #define    ep8            1033            /* Run "External Proc #8" command    */
  43. #define    ep9            1034            /* Run "External Proc #9" command    */
  44. #define    eaSelectAll    1035            /* Edit "Select All" command        */
  45. #define    eaDebugger    1036            /* Edit "Hide/Show Debugger" command*/
  46.  
  47. struct CEAPane : CPanorama {        /* External area pane object        */
  48.  
  49.                                     /* Variable instances                */
  50.     Rect    eaRect;                    /* External rect area                */
  51.     Rect    eaSRect;                /* Scrolled external rect area        */
  52.     C4th    *eaObject;                /* External 4th object handle        */
  53.     Point    lastWhere;                /* Last where event mouse position    */
  54.     
  55.                                     /* Method instances                    */
  56.     void    Dispose(void);            /* Dispose ext area method            */
  57.     void    UpdateMenus(void);        /* Update menu items method            */
  58.     void    AdjustToEnclosure(Rect *);/* Adjust to enclosure area        */
  59.     void    AdjustCursor(Point, RgnHandle);/* Adjust cursor    method        */
  60.     void    Dawdle(long *);            /* Dawdle (Idle) method                */
  61.     void    Draw(Rect *);            /* Draw method                        */
  62.     void    Scroll(short,short,Boolean);/* Scroll method                */
  63.     void    DoClick(Point,short,long);/* Mouse down method                */
  64.     void    DoKeyDown(char,Byte,EventRecord *);/* Key-down event method */
  65.     void    DoAutoKey(char,Byte,EventRecord *);/* Key-down event method */
  66.     void    Activate(void);            /* Activate pane method                */
  67.     void    Deactivate(void);        /* Deactivate pane method            */
  68.     void    DoCommand(long);        /* Command method                    */
  69.     void    DoSendEvent(short);        /* Send event method                */
  70.     void     DoExtEvent(EventRecord *);/* Execute ext area procedure        */
  71.     void     DoExtProc(short);        /* Execute ext area procedure        */
  72.     short    DoGetModifiers(void);    /* Get current modifiers            */
  73.     };
  74.     
  75. struct CDbgDoc : CDocument {        /* Debugger (bogus) document object    */
  76.     
  77.                                     /* Method instances                    */
  78.     Boolean    Close(Boolean);            /* Close                            */
  79.     };
  80.     
  81. struct CDbgPane : CEditText {        /* Text edit pane object            */
  82.     
  83.                                     /* Variable instances                */
  84.     short    maxChars;                /* Maximum number of characters        */
  85.     
  86.                                     /* Method instances                    */
  87.     void    DoPrint(char *, ...);    /* Do print output stream            */
  88.     };
  89.  
  90.                                     /* 4th Debugger classes                */
  91. struct C4thDbgApp : CApplication {    /* Application object                */
  92.  
  93.                                     /* Variable instances                */
  94.     CDocument *eaDoc;                /* External Area window document    */
  95.     CDbgDoc    *dbgDoc;                /* Debugger window document            */
  96.     Str255    eaName;                    /* External area name                */
  97.     Rect    eaIRect;                /* External initial rect area        */
  98.     ProcPtr    eaProc[10];                /* External procedure table            */
  99.     
  100.                                     /* Methods                            */
  101.     void    IApplication(short,Size,Size);/* Initialization                */
  102.     void    InitExtArea(void);        /* Init external area                */
  103.     void    InstallExtProc(short,ProcPtr);/* Install external procedure    */
  104.     void    SetExtArea(short,short,short,short);/* Set ext rect area    */
  105.     void    SetExtName(char *);        /* Set external name                */
  106.     void    CreateDocument(void);    /* Create debugger window            */
  107.     void    CreateExtArea(void);    /* Create external area window        */
  108.     void    DoCommand(long);        /* Command                            */
  109.     void    UpdateMenus(void);        /* Update menu items                */
  110.     void    AboutThis(void);        /* About this dialog                */
  111.     };
  112.  
  113.                                     /* Define external references        */
  114. extern    C4thDbgApp        *gApplication;/* Application object                */
  115. extern    CDecorator        *gDecorator;/* Window display object            */
  116. extern    CDesktop        *gDesktop;    /* Desktop view layer object         */
  117. extern    CBartender        *gBartender;/* Menu handler object                */
  118.  
  119. #endif